Mathematics · Year 3 14 min read

Complex Analysis: Calculus on a Plane Where Everything Fits Together

Take the calculus you know and let the variable wander off the number line into a plane. The rules get stricter, and in exchange the theorems become almost unreasonably strong.
The Default Library · What Each Major Knows · 74

Here is a small mystery that nothing in first-year calculus can explain. The function 1/(1 + x²) is as well behaved as a function gets. It is smooth at every real number, with no jumps, no spikes and no division by zero anywhere. Yet if you write its Taylor series around x = 0, the series works for x between −1 and 1 and falls apart outside, even at x = 1.5, where the function itself is perfectly calm. Why would a series care about the number 1?

The answer is not on the number line at all. The function 1/(1 + x²) does blow up, just not at a real number: it blows up where x² = −1, at x = i and x = −i. Those two points are exactly one step away from zero, and the series can feel them from the other side of the page. A graduate of a complex analysis course carries this picture permanently: a real function is a shadow of a function on the plane, and the shadow's behaviour is controlled by things you cannot see in the shadow.

That is the whole subject in one image. Do calculus with numbers of the form a + bi, and the demand that derivatives exist turns out to be so strict that functions become rigid, predictable and tightly linked. This piece walks through the six ideas a graduate keeps, with a proof sketch for each, so you can feel why they are true.

The course in one box
Who takes it
Mathematicians, physicists and electrical engineers, usually in year 2 or 3. MIT teaches it as 18.04 Complex Variables with Applications to mathematicians, physicists and engineers together; the Cambridge Mathematical Tripos covers complex analysis in its second year. Some programmes run a proof-heavy version for mathematicians and a methods version for physicists.
What it is for
Doing calculus with complex numbers, which gives shortcuts to real integrals, a deep understanding of power series, and the language of waves, signals and quantum mechanics.
Comes after
Multivariable Calculus (34/02) and Real Analysis (34/72).
Leads to
No later subject in this series formally requires it, but it feeds Partial Differential Equations (34/79), Quantum Mechanics (34/83), Signals and Systems (34/37) and Number Theory (34/75), where the Riemann zeta function lives.
What this piece gives you
You will not be able to prove the residue theorem in full generality. You will see why multiplying is turning, why a derivative on a plane is a stretch and a turn, why integrals around loops forget their shape, and how that lets you compute a real integral by leaving the real line. Easier first reads: Euler's Identity, Built Step by Step (12/19) and Calculus: The Language of Change (12/11). This piece goes further and makes you do it.

Multiplying is turning: why the plane is the right home for numbers

A complex number a + bi is a point on a plane: a steps along, b steps up. The only thing that sounds odd is the rule i² = −1. Here is the picture that makes it ordinary. Every complex number has a length (its distance from zero) and an angle (measured from the positive real axis). Multiplying two complex numbers does something simple to those two things:

|zw| = |z|·|w| and arg(zw) = arg z + arg wmultiply the lengths, add the angles

So multiplying by i, which has length 1 and angle 90°, is a pure quarter-turn. Do it twice and you have turned 180°, which is multiplying by −1. That is all i² = −1 means. The square root of −1 is not mysterious; it is the number you multiply by to turn a quarter of the way round.

Proof sketch · why (1 + i)² must be 2i

The number 1 + i sits 1 right and 1 up, so its length is √2 and its angle is 45°. Squaring it multiplies the length by itself (√2 × √2 = 2) and doubles the angle (90°). A point of length 2 at 90° is 2i. The real trick is the rule "lengths multiply, angles add"; once you have it, algebra becomes geometry. Expanding (1 + i)(1 + i) = 1 + 2i + i² = 2i agrees.

Try it yourself. Set two numbers by length and angle and watch the product.

Interactive · Multiply by turning
Length of z
Angle of z
Length of w
Angle of w

Blue is z, orange is w, green is zw. The readout multiplies the real and imaginary parts directly, (a + bi)(c + di) = (ac − bd) + (ad + bc)i, and also shows length × length and angle + angle. They always agree.

With z = 1.4 at 45° and w = 1 at 90°, the product has length 1.4 and angle 135°. The preset "Undo a turn" multiplies a length-2 number at 30° by a length-0.5 number at 330°, which is the same as −30°: the lengths cancel to 1 and the angles cancel to 0, landing on the number 1. Division is turning back.

Differentiable means: only a stretch and a turn

In real calculus, a derivative is a slope: near a point, the function looks like a straight line. In the complex plane the input and the output are both planes, and "looks like a straight line" becomes "looks like multiplying by one fixed complex number". And you now know what that does: it stretches by its length and turns by its angle. So a complex-differentiable function, viewed close up, only scales and rotates. It never shears or flips or squashes more in one direction than another.

That is a much stricter demand than in real calculus, because the limit defining the derivative has to give the same answer no matter which direction you approach from: from the left, from below, along a spiral. The simplest function that fails is conjugation, z ↦ z̄ (flip the sign of the imaginary part): approach 0 along the real axis and the difference quotient is 1, along the imaginary axis it is −1. No single derivative exists, and conjugation is a mirror.

Proof sketch · the Cauchy–Riemann equations

Write f = u + iv. Step to the right by h and the derivative is ∂u/∂x + i ∂v/∂x. Step up by ih and it is (1/i)(∂u/∂y + i ∂v/∂y) = ∂v/∂y − i ∂u/∂y. The real trick is to demand these two be equal. Matching real and imaginary parts gives ux = vy and uy = −vx. Those are the Cauchy–Riemann equations, and they say exactly "the derivative is one stretch-and-turn".

f′(z) = lim (f(z + h) − f(z)) ÷ hh is a complex step, and the answer must not depend on its direction

The payoff is that these maps preserve angles: two curves crossing at 90° cross at 90° after the map. Map makers use this (conformal maps keep local shapes), and engineers use it to turn awkward shapes into easy ones. Watch a grid get bent and notice the squares stay square.

Interactive · Bend the plane
Probe point, real part
Probe point, imaginary part

Left: the input grid with your probe point. Right: where the function sends it. The readout measures the image of a tiny right-pointing step and a tiny upward step numerically (step size 10⁻⁶).

For z² at the probe point 0.7 + 0.5i the derivative is 2z = 1.4 + 1.0i, which stretches by about 1.72 and turns by 35.5°. The readout measures this from scratch and also reports the angle between the images of a rightward and an upward step: 90° every time, apart from the places where the derivative is zero. Slide the probe to 0 on z² and the angle rule fails honestly: z² doubles angles there, a clean example of why a zero derivative is special.

Loops forget their shape: Cauchy's theorem and the pole

Now integrate. Walk a loop in the plane and add up f(z) dz along the way. Here is the central theorem of the subject: if f is complex-differentiable everywhere inside a loop, the integral around the loop is exactly zero. Any loop, any shape, any size. Whatever the function does on the way out, it undoes on the way back.

Proof sketch · why it's zero, and why 1/z is different

If f has an antiderivative F (a function whose derivative is f), then the integral along a path is F(end) − F(start). A loop starts and ends at the same point, so the integral is F(start) − F(start) = 0. For z², the antiderivative is z³/3, and that is a perfectly good function of position. The real trick is to ask whether the antiderivative returns to its old value after a lap. For 1/z, the antiderivative is the logarithm, and log z = ln|z| + i·arg z. Walk once round the origin and the angle goes up by 2π, so the logarithm does not come back: it gains 2πi. That gain is the integral.

∮ dz ÷ z = 2πionce round the origin, whatever the shape of the loop, as long as it encircles 0

So the only thing a loop integral can detect is a pole: a point where the function blows up and the antiderivative picks up a twist. Move the loop around and see what it detects.

Interactive · What does the loop enclose?
Circle centre, x
Circle centre, y
Radius

Poles are the orange dots. The integral is a trapezoid sum of f(z)·dz around the circle with 2,000 steps. If the circle runs through a pole the integral does not exist and the page says so.

What to see: z² gives 0 for every loop. 1/z gives 2πi ≈ 6.283i when the loop contains the origin and 0 when it does not. The sum 1/z + 1/(z − 2) gives 4πi when the loop holds both poles, 2πi for one. And the surprise: 1/z² has a pole at the origin but the integral is still 0, because its antiderivative −1/z comes back to itself after a lap. It is the coefficient of 1/z, the residue, that the loop sees.

Residues: solving a real integral by leaving the real line

Put the last two ideas together and you get one of the most useful tricks in applied mathematics. The residue theorem: the integral around a loop is 2πi times the sum of the residues of the poles inside it.

∮ f(z) dz = 2πi × (sum of residues inside)the residue at a simple pole p is the number c in f(z) ≈ c ÷ (z − p) near p

Why would that help with a real integral? Because you can close up a real line with a huge semicircle through the upper half of the plane, and the loop integral has two parts: the straight bit you want, plus the arc. If the arc part shrinks to zero as the semicircle grows, then the real integral equals 2πi times the residues inside. Take f(z) = 1/(1 + z²), which has poles at i and −i. Only i is in the upper half-plane. Near i, 1 + z² = (z − i)(z + i), so f ≈ 1/(2i) × 1/(z − i): the residue is 1/(2i). Then:

∫ from −∞ to ∞ of dx ÷ (1 + x²) = 2πi × 1/(2i) = πthe answer you can check with arctan, got here by a detour through the plane
Proof sketch · why the arc vanishes

On the arc, |z| = R, so |1 + z²| ≥ R² − 1. The arc has length πR. A bound on the integral is (length) × (largest value of the integrand) ≤ πR ÷ (R² − 1). The real trick is that R² in the denominator beats R in the numerator, so the bound shrinks like π/R. The same argument handles integrals like ∫ dx/(1 + x⁴) = π/√2 ≈ 2.2214, where the real-line antiderivative is a mess.

Interactive · Close the contour
Semicircle radius R

The line integral is 2·arctan R (exact). The arc integral is a midpoint sum over 2,000 steps. Their total is π for every R > 1; that equals 2πi times the residue 1/(2i). The picture is drawn with the semicircle at fixed size, so the pole at i slides down as R grows.

At R = 3 the straight part is 2.498 and the arc contributes about 0.644, summing to π = 3.1416. At R = 40 the straight part has grown to 3.092 and the arc has shrunk to 0.050. The total never moves from π; the arc is just the shortfall of the straight part, and the shortfall fades as R grows. That is the residue theorem doing its work.

Power series know where the poles are

Back to the opening mystery. A function that is complex-differentiable on a disc is equal to its Taylor series on that whole disc, and the disc can be as large as the distance to the nearest trouble. That is a theorem with a one-line reason: near a pole at w, the function behaves like 1/(z − w), and the geometric series 1/(z − w) = −(1/w)(1 + z/w + (z/w)² + …) only converges while |z| < |w|. The series is only as wide as the distance to the nearest pole, measured in the plane, not on the line.

radius of convergence = distance from the centre to the nearest singularityfor 1/(1 + x²) at centre a: radius = √(1 + a²), because the poles are at ±i

At centre 0, the poles ±i are 1 away, so the series 1 − x² + x⁴ − … converges for |x| < 1 and nowhere else. Move the centre to a = 1 and the distance becomes √2 ≈ 1.414. At a = 2, √5 ≈ 2.236. The series centred further out sees the poles from further away. Try a point beyond the radius and watch the partial sums fly apart.

Interactive · Where does the series stop working?
Centre a
Evaluate at x
Terms used

Blue: 1/(1 + x²). Orange: the Taylor polynomial with the number of terms you pick (clipped to the frame). Shaded: the interval a ± √(1 + a²) where the series converges. Coefficients come from the exact formula cₙ = (1/2i)[−1/(i − a)ⁿ⁺¹ + 1/(−i − a)ⁿ⁺¹].

With a = 0 and x = 0.8, twelve terms give 0.568 against the true value 0.610, and forty terms give 0.6097: converging, slowly, because 0.8 is close to the edge. Push x to 1.5 and twelve terms give about −39.6, thirty terms give about 59,000. Outside the radius 1, more terms make it worse, not better. Now set the centre a = 1 and look at x = 1.5: it is inside the new radius √2, and twelve terms give 0.30769 against the true 0.30769.

Every polynomial has a root

The fundamental theorem of algebra says every non-constant polynomial with complex coefficients has a root in the complex numbers. No real-number-only version holds: x² + 1 has none. Once you allow the plane, it never again fails; this is why it is called "algebraically closed", and why engineers can always factor a transfer function into first-degree pieces.

Proof sketch · by Liouville's theorem

Suppose a polynomial p never equals zero. Then 1/p is complex-differentiable on the entire plane. As |z| grows, |p| grows without limit, so 1/p heads to zero at large distances and is bounded everywhere. The real trick is Liouville's theorem: a bounded function that is differentiable on the entire plane must be constant. Then 1/p is constant, so p is constant, contradicting that p was non-constant.

The theorem says roots exist; it does not say how to find them. One method from first-year calculus, Newton's method, takes on a new character in the plane. Start at a guess z, and update z ← z − f(z)/f′(z). For f(z) = z³ − 1 there are three roots, the three cube roots of 1: at 1, and at 120° and 240°. Which root does each starting point end up at? The map of answers is a fractal and the boundaries between the three basins are infinitely intricate. Tap the picture to start from a point.

Interactive · Newton's method on z³ − 1
Start, real part
Start, imaginary part

Colour shows which root a start reaches within 40 steps (red: 1, green: the 120° root, blue: the 240° root). Brighter means fewer steps. Tap the map or use the sliders. The white dot is your start and the white line is its path. At 0 the derivative is 0, so Newton's method cannot take a step.

Starting at 0.6 + 0.9i, the path takes 7 steps and lands on the 240° root, even though the 120° and the real root are nearer in the plane's geometry: the first step jumps to 0.29 + 0.34i and the second throws the point down to −0.06 − 1.44i. Nearby starts can end at a different root. Near a boundary, a tiny nudge changes the answer, and zooming in never makes the boundary simple.

What a graduate just sees

Where it shows up next

If you want to go deeper

The takeaway

Let the variable live on a plane and "differentiable" shrinks to "only a stretch and a turn". That strictness buys miracles: loop integrals that forget their path and see only poles, series whose width is the distance to hidden trouble, a real integral done by a detour, and a root for every polynomial.

Try this: this week, take a smooth function you know, such as 1/(1 + x²), and ask where it would break if x could be any complex number. The answer tells you what its series, its integrals and its behaviour far from zero will do.

Sources & Further Reading

Sources. The Cauchy–Riemann equations, Cauchy's theorem, the residue theorem, Liouville's theorem and the fundamental theorem of algebra are standard (Stein & Shakarchi, ch. 1–3; Brown & Churchill). Course contents: MIT OCW 18.04 page (Spring 2018). Every number an interactive shows was computed in node: (1+i)² = 2i; f′(0.7+0.5i) = 1.4+1.0i, modulus 1.7205, argument 35.54°; line integral 2·arctan(3) = 2.4981 plus arc gives π to 10 digits; ∫dx/(1+x⁴) = π/√2 = 2.2214; Taylor sums at a = 0, x = 0.8: 12 terms 0.5679, 40 terms 0.60968, true 0.60976; x = 1.5, 12 terms −39.6, 30 terms 59,000; a = 1, x = 1.5, 12 terms 0.307693 vs 0.307692; arc at R = 3 is 0.6435, at R = 40 is 0.04999; Newton from 0.6+0.9i reaches the 240° root in 7 steps. The Taylor-series and radius example is the standard textbook one.